#ifndef _STRAWGUI_RESOURCE_H_
#define _STRAWGUI_RESOURCE_H_

#include "sNamedObject.h"
#include "DataBase.h"
#include "sConfig.h"
#include "sTexturePreset.h"

namespace sgui
{

namespace res
{

class sResourceContent;

class sResourceItem: public sNamedObject
{
public:
    sResourceItem(sGUI&gui, const std::wstring& name);
};

class sResource : public sNamedObject
{
private:
    std::vector<sResourceContent*> m_contents;
public:
    void load(const db::Record &file);
    void save(db::Record &file) const;
    void clear();

    virtual preset::sPreset* getPreset(const std::wstring& name) { return NULL; }
    virtual const std::wstring getClass() const = 0;

    std::vector<sResourceContent*>& getContents();
    const std::vector<sResourceContent*>& getContents() const;
	sResourceContent* addContent();

#ifdef _EDITOR
	void exportRTTI(rtti::sInfoList& list);
#endif

    sResource(sGUI&gui, const std::wstring& name);
};

};
};

#endif